/*
 * fw_callout.h
 *
 *  Created on: 2021年2月11日
 *      Author: taoyu
 */

#ifndef FRAMEWORK_FRAMEWORK_HOOKS_H_
#define FRAMEWORK_FRAMEWORK_HOOKS_H_

#include "framework_types.h"

/* user must init for the power mode */
extern void powermodeHook_init(void);
/* power mode - sleep */
extern void powermodeHook_sleep(void);
/* power mode - stop mcu */
extern void powermodeHook_stop(void);
/* power mode - wake up */
extern void powermodeHook_wakeUp(void);

// init tasks
extern void schedulerHook_initTasks(void);

extern void schedulerHook_enterAwake(void);

/* user shall provide if all the software are ready for sleep */
extern boolean schedulerHook_isReadyForSleep(void);

/* user can do something in the idle task */
extern void schedulerHook_idle(void);

/* user tasks */
extern void schedulerHook_task1(void);
extern void schedulerHook_task2(void);
extern void schedulerHook_task4(void);
extern void schedulerHook_task8(void);
extern void schedulerHook_task16(void);
extern void schedulerHook_task32(void);
extern void schedulerHook_task64(void);
extern void schedulerHook_task128(void);
extern void schedulerHook_task256(void);

extern void schedulerHook_exitAwake(void);

extern void schedulerHook_enterAsleep(void);

/* power mode - sleep task */
extern void schedulerHook_taskAsleep(void);

extern void schedulerHook_exitAsleep(void);

#endif /* FRAMEWORK_FRAMEWORK_HOOKS_H_ */
